#ifndef BASE_VECTOR_POINT_H
#define BASE_VECTOR_POINT_H

#include <math.h>
#include <GL/glut.h>
#include <GL/glx.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define PI (3.141592653589793)

typedef struct
{
  double x, y, z;
} Point;

typedef struct 
{
  double R;
  double G;
  double B;
}  Couleur;


Point pt(float x, float y, float z);
double rad (double x);
void print_point (Point p);

/* fonctions */
void chooseColor(double r, double g, double b);
void chooseColorOpaque(double r, double g, double b);
unsigned char estBlanc(Couleur c);

Couleur cl (double r,double g,double b);
void chooseCouleur(Couleur c);

void drawPoint(double x, double  y, double z);
void drawTruePoint(Point p);
void drawLine(double x1, double  y1, double z1, double x2, double y2, double z2);
void drawTrueLine(Point p1,Point p2);
void drawQuad(Point p1, Point p2, Point p3, Point p4);


double norme3d (Point a);
double scalaire (Point a,Point b);
Point normalise (Point a);
Point toVector (Point a,Point b);

Point** newMatricePoint (int nbcoup);
Point** newMatricePoint_noSquare (int ligne,int colonne);

Couleur** newMatriceCouleur(int nbcoup);
void libererMatricePoint(Point** matrice,int nbcoup);
void libererMatriceCouleur(Couleur** matrice,int nbcoup);



#endif
